﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Exhibition.Dao.ViewModel;
using Exhibition.Service;

namespace Exhibition.Manage
{
    public partial class NavList : BaseAdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
                LoadTree();
            
        }

        private void LoadTree()
        {
            List<NavModel> navs = CenterService.navService.GetListBySiteid(CurrentSite.Id);
            treeList.KeyFieldName = "Id";
            treeList.ParentFieldName = "ParentID";
            treeList.DataSource = navs;
            treeList.DataBind();
           // treeList.ExpandToLevel(2);


        }
    }
}